@model ConsentViewModel

<div id="consent" class="base">
  <div>
    @if (Model.ClientLogoUrl != null)
    {
      <div><img src="@Model.ClientLogoUrl"></div>
    }
    <h1>
      授权 - @Model.ClientName
    </h1>
    <p>取消选中您不希望授予的权限。</p>
  </div>

  <div>
    <div>
      <partial name="_ValidationSummary" />
    </div>
  </div>

  <form asp-action="Index">
    <input type="hidden" asp-for="ReturnUrl" />
    <div>
      <div>
        @if (Model.IdentityScopes.Any())
        {
          <div>
            <div>
              <div>
                <span></span>
                身份范围
              </div>
              <ul>
                @foreach (var scope in Model.IdentityScopes)
                {
                  <partial name="_ScopeListItem" model="@scope" />
                }
              </ul>
            </div>
          </div>
        }

        @if (Model.ApiScopes.Any())
        {
          <div>
            <div>
              <div>
                <span></span>
                Api范围
              </div>
              <ul>
                @foreach (var scope in Model.ApiScopes)
                {
                  <partial name="_ScopeListItem" model="scope" />
                }
              </ul>
            </div>
          </div>
        }

        <div>
          <div>
            <div>
              描述：<input class="form-control" placeholder="设备的描述或名称" asp-for="Description" autofocus>
            </div>
          </div>
        </div>

        @if (Model.AllowRememberConsent)
        {
          <div style="margin-top: 15px;">
            <div>
              <input class="form-check-input" asp-for="RememberConsent">
              <label class="form-check-label" asp-for="RememberConsent">
                <strong>记住我的决定</strong>
              </label>
            </div>
          </div>
        }
      </div>
    </div>

    <div>
      <div style="">
        <button name="button" value="yes" class=" el-button el-button--primary rgBtn" autofocus>确认</button>
        <button name="button" value="no" class="el-button">拒绝</button>
      </div>
      @* <div class="col-sm-4 col-lg-auto">
        @if (Model.ClientUrl != null)
        {
        <a class="btn btn-outline-info" href="@Model.ClientUrl">
        <span class="glyphicon glyphicon-info-sign"></span>
        <strong>@Model.ClientName</strong>
        </a>
        }
        </div> *@
    </div>
  </form>
</div>

@section scripts{
<script>
  var vm = new Vue({
    el: '#consent',
    data() {
      return {
        consentForm: {

        }
      }
    },
    methods: {

    },
    created: function () {

    }
  })
</script>
}
